#ifndef _CERTUS_VER_TOKEN_ALPHANUMERIC_BINDINGS__H_
#define _CERTUS_VER_TOKEN_ALPHANUMERIC_BINDINGS__H_

#include <boost/python.hpp>

#include <version.h>
#include <ver_token_alphanumeric.h>

namespace certus { namespace ver {

    template<typename T>
    struct ver_token_alphanumeric_bind
    {
        typedef ver_token_alphanumeric<T> token_type;

        ver_token_alphanumeric_bind(const char *name)
        {
            boost::python::class_<token_type> cl(name,boost::python::init<const std::string &>());

            cl
            .def(boost::python::self < boost::python::self)
            .def(boost::python::self == boost::python::self)
            .def(boost::python::self != boost::python::self)
            .def("get_next",&token_type::get_next)
            .def("get_min",&token_type::get_min)
            .def("get_max",&token_type::get_max)
            .def("__str__",toString);
            ;
        }

        static std::string toString(const token_type &self)
        {
            std::ostringstream s;
            s << self;
            return s.str();
        }
    };
}}

#endif

